onEvent('recipes', (event) => {
    /**
     * 这玩意好难弄的，但是为什么没人用呢
     */
    const recipes = [
        {
            output: 'kubejs:item_13',
            pattern: ['   ', '   ', ' AA'],
            key: {
                A: 'kubejs:titaniumalloy_plate',
            },
        },
        {
            output: 'kubejs:item_14',
            pattern: ['AAA', 'AAA', 'AAA'],
            key: {
                A: 'minecraft:iron_block',
            },
        },
    ];


    recipes.forEach((recipe) => {
        event.shaped(recipe.output, recipe.pattern, recipe.key);
    });

    const shaperecipes = [
        {
            output: Item.of('create:schematic', '{Owner:"publicovo",Anchor:{X:0,Y:0,Z:0},Bounds:{X:9,Y:5,Z:9},Deployed:0b,File:"ast_wxq.nbt",Rotation:"NONE",Mirror:"NONE"}'),
            input: ['kubejs:item_1']
        },
        {
            output: Item.of('create:schematic', '{Owner:"fafaava",Anchor:{X:0,Y:0,Z:0},Bounds:{X:3,Y:4,Z:4},Deployed:0b,File:"assembly_magic_machine.nbt",Rotation:"NONE",Mirror:"NONE"}'),
            input: ['kubejs:item_2']
        },
        {
            output: Item.of('create:schematic', '{Owner:"fafaava",Anchor:{X:0,Y:0,Z:0},Bounds:{X:7,Y:4,Z:7},Deployed:0b,File:"ast_infuser.nbt",Rotation:"NONE",Mirror:"NONE"}'),
            input: ['kubejs:item_3']
        },
        {
            output: Item.of('create:schematic', '{Owner:"fafaava",Anchor:{X:0,Y:0,Z:0},Bounds:{X:11,Y:5,Z:11},Deployed:0b,File:"ast_altar.nbt",Rotation:"NONE",Mirror:"NONE"}'),
            input: ['kubejs:item_4']
        },
        {
            output: Item.of('create:schematic', '{Owner:"fafaava",Anchor:{X:0,Y:0,Z:0},Bounds:{X:3,Y:5,Z:4},Deployed:0b,File:"crystal_planter.nbt",Rotation:"NONE",Mirror:"NONE"}'),
            input: ['kubejs:item_5']
        },
        {
            output: Item.of('create:schematic', '{Owner:"fafaava",Anchor:{X:0,Y:0,Z:0},Bounds:{X:5,Y:6,Z:5},Deployed:0b,File:"mek_basic_fission_reactor_1.nbt",Rotation:"NONE",Mirror:"NONE"}'),
            input: ['kubejs:item_9']
        },
        {
            output: Item.of('create:schematic', '{Owner:"fafaava",Anchor:{X:0,Y:0,Z:0},Bounds:{X:5,Y:9,Z:5},Deployed:0b,File:"mek_basic_industrial_turbine.nbt",Rotation:"NONE",Mirror:"NONE"}'),
            input: ['kubejs:item_10']
        },
        {
            output: Item.of('create:schematic', '{Owner:"fafaava",Anchor:{X:0,Y:0,Z:0},Bounds:{X:7,Y:7,Z:7},Deployed:0b,File:"mek_basic_sps.nbt",Rotation:"NONE",Mirror:"NONE"}'),
            input: ['kubejs:item_11']
        },
        {
            output: Item.of('create:schematic', '{Owner:"fafaava",Anchor:{X:0,Y:0,Z:0},Bounds:{X:5,Y:9,Z:5},Deployed:0b,File:"mek_thermoelectric_boiler.nbt",Rotation:"NONE",Mirror:"NONE"}'),
            input: ['kubejs:item_12']
        },
        {
            output: Item.of('create:schematic', '{Owner:"fafaava",Anchor:{X:0,Y:0,Z:0},Bounds:{X:16,Y:1,Z:16},Deployed:0b,File:"nr2_base.nbt",Rotation:"NONE",Mirror:"NONE"}'),
            input: ['kubejs:item_13']
        },
        {
            output: Item.of('create:schematic', '{Owner:"fafaava",Anchor:{X:0,Y:0,Z:0},Bounds:{X:20,Y:28,Z:20},Deployed:0b,File:"original_spawn_mobs.nbt",Rotation:"NONE",Mirror:"NONE"}'),
            input: ['kubejs:item_14']
        },
        {
            output: Item.of('create:schematic', '{Owner:"fafaava",Anchor:{X:0,Y:0,Z:0},Bounds:{X:9,Y:3,Z:9},Deployed:0b,File:"hephaestus_forge.nbt",Rotation:"NONE",Mirror:"NONE"}'),
            input: ['kubejs:item_15']
        },
        {
            output: Item.of('create:schematic', '{Owner:"fafaava",Anchor:{X:0,Y:0,Z:0},Bounds:{X:23,Y:28,Z:23},Deployed:0b,File:"little_sun.nbt",Rotation:"NONE",Mirror:"NONE"}'),
            input: ['kubejs:item_16']
        },
        {
            output: Item.of('create:schematic', '{Owner:"fafaava",Anchor:{X:0,Y:0,Z:0},Bounds:{X:5,Y:7,Z:5},Deployed:0b,File:"transmutation_study.nbt",Rotation:"NONE",Mirror:"NONE"}'),
            input: ['kubejs:item_17']
        },
        {
            output: Item.of('create:schematic', '{Owner:"fafaava",Anchor:{X:0,Y:0,Z:0},Bounds:{X:17,Y:11,Z:17},Deployed:0b,File:"blood_altar.nbt",Rotation:"NONE",Mirror:"NONE"}'),
            input: ['kubejs:item_117']
        }
    ];
    shaperecipes.forEach((recipe) => {
        event.shapeless(recipe.output, recipe.input);
    });

    event.recipes.custommachinery.custom_machine("custommachinery:blueprint_making_machine", 100)
        .requireItem('astralsorcery:fountain')
        .requireItem('8x astralsorcery:marble_pillar')
        .requireItem('10x astralsorcery:marble_runed')
        .requireItem('2x astralsorcery:black_marble_raw')
        .requireItem('astralsorcery:fountain_prime_liquid')
        .requireItem('astralsorcery:chalice')
        .produceItem('kubejs:item_1')


    event.recipes.custommachinery.custom_machine("custommachinery:blueprint_making_machine", 100)
        .requireItem('astralsorcery:infuser')
        .requireItem('8x astralsorcery:marble_chiseled')
        .requireItem('20x astralsorcery:marble_runed')
        .requireItem('16x astralsorcery:marble_raw')
        .requireItem('4x astralsorcery:marble_pillar')
        .requireItem('minecraft:lapis_block')
        .produceItem('kubejs:item_3')

    event.recipes.custommachinery.custom_machine("custommachinery:blueprint_making_machine", 100)
        .requireItem('astralsorcery:altar_constellation')
        .requireItem('20x astralsorcery:black_marble_raw')
        .requireItem('40x astralsorcery:marble_bricks')
        .requireItem('4x astralsorcery:marble_runed')
        .requireItem('8x astralsorcery:marble_pillar')
        .requireItem('12x astralsorcery:marble_raw')
        .requireItem('4x astralsorcery:marble_chiseled')
        .produceItem('kubejs:item_4')



    //mek 裂变反应堆
    event.recipes.custommachinery.custom_machine("custommachinery:blueprint_making_machine", 100)
        .requireItem('44x mekanismgenerators:reactor_glass')
        .requireItem('5x mekanismgenerators:control_rod_assembly')
        .requireItem('64x mekanismgenerators:fission_reactor_casing')
        .requireItem('4x mekanismgenerators:fission_reactor_port')
        .requireItem('15x mekanismgenerators:fission_fuel_assembly')
        .produceItem('kubejs:item_9')

    event.recipes.custommachinery.custom_machine("custommachinery:blueprint_making_machine", 100)
        .requireItem('8x mekanism:pressure_disperser')
        .requireItem('mekanismgenerators:rotational_complex')
        .requireItem('64x mekanismgenerators:turbine_casing')
        .requireItem('33x mekanismgenerators:turbine_vent')
        .requireItem('5x mekanismgenerators:turbine_rotor')
        .requireItem('2x mekanismgenerators:turbine_valve')
        .requireItem('3x mekanismgenerators:electromagnetic_coil')
        .requireItem('6x mekanismgenerators:saturating_condenser')
        .requireItem('62x mekanism:structural_glass')
        .produceItem('kubejs:item_10')

    event.recipes.custommachinery.custom_machine("custommachinery:blueprint_making_machine", 100)
        .requireItem('2x mekanism:supercharged_coil')
        .requireItem('64x mekanismgenerators:reactor_glass')
        .requireItem('53x mekanismgenerators:reactor_glass')
        .requireItem('54x mekanism:sps_casing')
        .requireItem('4x mekanism:sps_port')
        .produceItem('kubejs:item_11')

    event.recipes.custommachinery.custom_machine("custommachinery:blueprint_making_machine", 100)
        .requireItem('9x mekanism:superheating_element')
        .requireItem('9x mekanism:pressure_disperser')
        .requireItem('64x mekanism:structural_glass')
        .requireItem('14x mekanism:structural_glass')
        .requireItem('64x mekanism:boiler_casing')
        .requireItem('15x mekanism:boiler_casing')
        .requireItem('4x mekanism:boiler_valve')
        .produceItem('kubejs:item_12')

    event.recipes.custommachinery.custom_machine("custommachinery:blueprint_making_machine", 100)
        .requireItem('minecraft:smithing_table')
        .requireItem('48x forbidden_arcanus:polished_darkstone')
        .requireItem('9x forbidden_arcanus:arcane_chiseled_polished_darkstone')
        .requireItem('4x forbidden_arcanus:chiseled_arcane_polished_darkstone')
        .produceItem('kubejs:item_15')
    
        event.recipes.custommachinery.custom_machine("custommachinery:blueprint_making_machine", 100)
        .requireItem('bloodmagic:altar')
        .requireItem('4x bloodmagic:bloodstonebrick')
        .requireItem('4x minecraft:beacon')
        .requireItem('4x kubejs:party_3_ingot')
        .produceItem('kubejs:item_117')


    event.recipes.custommachinery.custom_machine("custommachinery:blueprint_making_machine", 100)
        .requireItem(Item.of('custommachinery:custom_machine_item', '{machine:"custommachinery:assembly_magic_machine"}'))
        .requireItem('8x astralsorcery:marble_arch')
        .requireItem('8x astralsorcery:marble_chiseled')
        .requireItem('16x minecraft:iron_bars')
        .requireItem('2x astralsorcery:marble_pillar')
        .requireItem('2x astralsorcery:black_marble_raw')
        .produceItem('kubejs:item_2')
        .produceItem(Item.of('custommachinery:custom_machine_item', '{machine:"custommachinery:assembly_magic_machine"}'),"output2")
        .requireFunctionOnEnd(ctx => {
            ctx.machine.addItemToSlot(
                "output3",
                Item.of('custommachinery:custom_machine_item', '{machine:"custommachinery:assembly_magic_machine"}'),
                false);
            return Result.success()
        })
    //.runCommandOnEnd('/summon minecraft:item ~ ~1 ~ {Item:{id:"custommachinery:custom_machine_item",Count:1b,tag:{machine:"custommachinery:assembly_magic_machine"}}}', false)

    event.recipes.custommachinery.custom_machine("custommachinery:blueprint_making_machine", 100)
        .requireItem(Item.of('custommachinery:custom_machine_item', '{machine:"custommachinery:crystal_planter"}'))
        .requireItem('24x pneumaticcraft:pressure_chamber_glass')
        .requireItem('8x astralsorcery:marble_chiseled')
        .requireItem('8x astralsorcery:marble_arch')
        .requireItem('2x astralsorcery:black_marble_raw')
        .produceItem('kubejs:item_5')
        .produceItem(Item.of('custommachinery:custom_machine_item', '{machine:"custommachinery:crystal_planter"}'),"output2")
        .requireFunctionOnEnd(ctx => {
            ctx.machine.addItemToSlot(
                "output3",
                Item.of('custommachinery:custom_machine_item', '{machine:"custommachinery:crystal_planter"}'),
                false);
            return Result.success()
        })
    // .runCommandOnEnd('/summon minecraft:item ~ ~1 ~ {Item:{id:"custommachinery:custom_machine_item",Count:1b,tag:{machine:"custommachinery:crystal_planter"}}}', false)

    event.recipes.custommachinery.custom_machine("custommachinery:blueprint_making_machine", 100)
        .requireItem(Item.of('custommachinery:custom_machine_item', '{machine:"custommachinery:little_sun"}'))
        .requireItem('64x draconicevolution:infused_obsidian')
        .requireItem('30x draconicevolution:infused_obsidian')
        .requireItem('64x kubejs:auroral_ringinnerwall')
        .requireItem('64x kubejs:auroral_ringinnerwall')
        .requireItem('64x kubejs:auroral_ringinnerwall')
        .requireItem('52x kubejs:auroral_ringinnerwall')
        .requireItem('64x kubejs:aurora_ringrestraintglass')
        .requireItem('40x kubejs:aurora_ringrestraintglass')
        .requireItem('3x minecraft:end_rod')
        .produceItem('kubejs:item_16')
        .produceItem(Item.of('custommachinery:custom_machine_item', '{machine:"custommachinery:little_sun"}'),"output2")
        .requireFunctionOnEnd(ctx => {
            ctx.machine.addItemToSlot(
                "output3",
                Item.of('custommachinery:custom_machine_item', '{machine:"custommachinery:little_sun"}'),
                false);
            return Result.success()
        })

    event.recipes.custommachinery.custom_machine("custommachinery:blueprint_making_machine", 100)
        .requireItem(Item.of('custommachinery:custom_machine_item', '{machine:"custommachinery:research_station1"}'))
        .requireItem('10x kubejs:compressed_marble')
        .produceItem('kubejs:item_17')
        .produceItem(Item.of('custommachinery:custom_machine_item', '{machine:"custommachinery:research_station1"}'),"output2")
        .requireFunctionOnEnd(ctx => {
            ctx.machine.addItemToSlot(
                "output3",
                Item.of('custommachinery:custom_machine_item', '{machine:"custommachinery:research_station1"}'),
                false);
            return Result.success()
        })
});
